﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IBLL;
using BLL;
using Comment;

namespace Lian_AiXiou
{
    public partial class ZhuChe : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (Page.IsPostBack) {
                if (Session["code"].Equals(txt_yan.Text))
                {
                    Model.TBLogins logins = new Model.TBLogins()
                    {
                        UserName = txt_yong.Text,
                        MobileNumber = txt_shou.Text,
                        Password = txt_mi.Text
                    };
                    IBLLTBLogins bLLTB = new BLLTBLogins();
                    OperResult result = bLLTB.CreateBLL(logins);
                    if (result.StatusCode == StatusCode.Succeed)
                    {
                        ClientScript.RegisterStartupScript(GetType(), "aa", $"alert('{result.Message}')",true);
                        Response.Redirect("DengLu.aspx");
                    }
                    ClientScript.RegisterStartupScript(GetType(), "aa", $"alert('{result.Message}')",true);
                }
            }
            
        }
    }
}